A demo of CSS3 animations and effects
This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.bar.js"></script>
<link rel="stylesheet" href="../css/animations.css" type="text/css" media="screen" />
Put this where you want the chart to show up:
<canvas id="cvs" width="600" height="250">
[No canvas support]
</canvas>
This is the code that generates the chart:
<script>
window.onload = function ()
{
var bar = new RGraph.Bar({
id: 'cvs',
data: [[5,8],[6,8],[7,4],[5,5],[8,5],[7,4],[5,2]],
options: {
colors: ['Gradient(white:red)', 'Gradient(rgb(255,255,255):#cdc:#cdc:#cdc)'],
labels: ['John','Luis','Pete','Jim','Kevin','Olga','Bert']
]
}).draw();
};
function selectAnimation(effect)
{
var select = document.getElementById('cvs');
select.className = '';
select.className = 'animated ' + effect;
}
</script>